<template>
  <div>
    <vol-box :lazy="true" :model.sync="model.box2" title="下单" :height="1000" :width="900"
      :padding="15">
      <VolForm ref="myform" :loadKey="loadKey" :formFileds="formFileds" :formRules="formRules">
      </VolForm>
      <div slot="footer">
        <Button type="success" @click="getForm">保存</Button>
        <Button type="error" @click="reset">重置</Button>

        <Button type="info" @click="model.box2 = false">
          <Icon type="md-close" />关闭
        </Button>
      </div>
      <Tabs>
        <TabPane label="商品明细" icon="ios-aperture">
          <!-- 从表1配置 -->
          <div class="tabs1-header">
            <div class="message"></div>
            <!-- 显示操作按钮 -->
            <!-- <div class="btn-group">
                <Button type="info"
                        size="small"
                        ghost
                        @click="del">删除行</Button>
                <Button type="info"
                        size="small"
                        ghost
                        @click="add">添加行</Button>
                <Button type="info"
                        size="small"
                        ghost
                        @click="()=>{$refs.table1.load()}">刷新</Button>
              </div> -->
          </div>
          <vol-table ref="tables" :clickEdit="true" :loadKey="true" :columns="tableColumns1"
            :pagination-hide="false" :height="200" :tableData="tableData" url="" :index="true"
            @rowClick="rowClick"></vol-table>
        </TabPane>
      </Tabs>
      <choosereservation ref="choosereservation" style="margin-bottom: 20px"></choosereservation>
      <choosegoods ref="choosegoods"></choosegoods>
    </vol-box>
    <vol-box :lazy="true" :model.sync="model.box3" title="添加备注" :height="400" :width="600"
      :padding="15">
      <el-input type="textarea" :show-word-limit="true" :rows="10" v-model="addRemarks"></el-input>

      <div slot="footer">
        <Button type="primary" :loading="loading" @click="submit()">保存</Button>
        <Button type="default" @click="model.box3 = false">关闭</Button>
      </div>
    </vol-box>
    <vol-box :lazy="true" :model.sync="model.box6" title="修改营期批次" :height="100" :width="250"
      :padding="15">
      <radio-group>
        <radio :label="kv.id" v-for="(kv, kvIndex) in radioList" :disabled="kv.disabled"
          :value="kv.id" :key="kvIndex" @input="radioChange1(kv)">
          <span>{{ kv.name }}</span>
        </radio>
      </radio-group>

      <div slot="footer">
        <Button type="primary" @click="box6Confirm">确认</Button>
      </div>
    </vol-box>
    <vol-box :model.sync="model.box5" title="商品信息" :height="600" :width="1100" :padding="15">
      <div style="padding: 0px 20px" class="checkboxcss">
        <div>
          <VolForm :label-width="100" :loadKey="true" :formFields="formFields5"
            :formRules="formRules5"></VolForm>

        </div>
        <VolHeader icon="md-apps" text="商品信息"
          style="margin-bottom: 10px; border: 0px; margin-top: 15px">
          <div slot="content"></div>
          <slot> </slot>
          <div style="text-align: right">
            <!-- <Button type="info" style="margin-left: 20px" :disabled="this.disabledStatus"> -->
            <!-- 退押</Button> -->
            <Button type="info" style="margin-left: 20px" @click="RefundAll()"
              :disabled="this.disabledStatus" v-show="this.RefundAllParam">整单取消</Button>
            <Button type="info" style="margin-left: 20px" @click="Refund()"
              :disabled="this.disabledStatus" v-show="this.RefundParam">取消</Button>
            <Button type="info" style="margin-left: 20px" @click="Verification()"
              :disabled="this.disabledStatus" v-show="this.VerificationParam">核销</Button>
            <Button type="info" style="margin-left: 20px" @click="OrderReissue()"
              :disabled="this.disabledStatus" v-show="this.OrderReissueParam">重新下发</Button>
            <Button type="info" style="margin-left: 20px" @click="EditCamper()"
              :disabled="this.disabledStatus" v-show="this.OrderInfoParam">编辑营员</Button>
            <Button type="info" style="margin-left: 20px" @click="ExportCamper()"
              :disabled="this.disabledStatus" v-show="this.OrderInfoParam">导出营员</Button>
            <Button type="info" style="margin-left: 20px" @click="OrderInfo()"
              :disabled="this.disabledStatus" v-show="this.OrderInfoParam">添加备注</Button>

            <Button type="error" style="margin-left: 20px" @click="OrderAppliedForce()"
              v-show="this.OrderAppliedForceParam">强制核销</Button>
            <Button type="error" style="margin-left: 20px" @click="ManualRefundForce()"
              v-show="this.ManualRefundForceParam">强制取消</Button>
            <Button type="error" style="margin-left: 20px" @click="getBatch()"
              :disabled="this.disabledStatus" v-show="this.OrderConfirmboxParam">修改批次</Button>
            <Button type="error" style="margin-left: 20px" @click="cancleConfirmbox()"
              :disabled="this.disabledStatus" v-show="this.cancelButton">取消订单</Button>
            <!-- <Button type="info" ghost>添加商品</Button> -->
          </div>
        </VolHeader>
        <vol-table ref="goodlisttable" :ck="false" :columns="columns" :height="400"
          :tableData="VSmallOrdersData" @rowClick="rowClick"></vol-table>
      </div>
      <div slot="footer">
        <Button type="default" @click="model.box5 = false">关闭</Button>
      </div>
    </vol-box>
    <vol-box :model.sync="model.box7" title="修改PMS确认号" :height="600" :width="800" :padding="15">
      <div style="padding: 0px 20px">
        <div>
          <VolForm :label-width="100" :loadKey="true" :formFields="formFields5"
            :formRules="formRules5"></VolForm>
          <VolForm :label-width="100" :loadKey="true" :formFields="formFields6"
            :formRules="formRules6"></VolForm>
        </div>
      </div>
      <div slot="footer">
        <!-- <Button type="default" @click="OrderConfirm()">确认</Button> -->
        <Button type="default" @click="model.box7 = false">关闭</Button>
      </div>
    </vol-box>
    <vol-box :model.sync="model.box8" title="报名单信息" :height="400" :width="1000" :padding="15">

      <el-form :inline="true">

        <div v-for="(a, index) in aobj" :key="index">
          <el-row>
            <el-col :span="15">
              <el-form-item :label="a.name" v-if="a.type == 'Textarea'">
                <el-input type="textarea" v-model="a.value" :value="a.value"
                  style=" margin-left: 80px;"></el-input>
              </el-form-item></el-col>
            <el-col :span="15">
              <el-form-item :label="a.name" v-if="a.type == 'Select'">
                <el-select>
                  <el-option v-for="(c, b) in a.option" :key="b"
                    v-show="a.value == c.value"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <!-- <el-col :span="15"> -->
          <el-form-item :label="a.name" v-if="a.type == 'Input'">
            <el-input v-model="a.value" :value="a.value"></el-input>
          </el-form-item>
          <!-- </el-col> -->
          <el-col :span="15">
            <el-form-item :label="a.type" v-if="a.type == 'InputNumber'">
              <template>
                {{ a.value }}
              </template>
            </el-form-item>
          </el-col>
          <el-col :span="15">
            <el-form-item :label="a.name" v-if="a.type == 'Switch'">
              <el-switch v-model="a.value" :value="a.value" active-color="#13ce66"
                inactive-color="#ff4949">
              </el-switch>
            </el-form-item>
          </el-col>
          <el-col :span="15">
            <el-form-item :label="a.name" v-if="a.type == 'Slider'">
              <el-slider v-model="a.value" :value="a.value"></el-slider>
            </el-form-item>
          </el-col>
          <el-col :span="15">
            <el-form-item :label="a.name" v-if="a.type == 'Timepicker'">
              <el-time-select :value="a.value" v-model="a.value"
                placeholder="选择时间"></el-time-select>
            </el-form-item>
          </el-col>
          <el-col :span="15">
            <el-form-item :label="a.name" v-if="a.type == 'DatePicker'">
              <el-date-picker :value="a.value" v-model="a.value" type="date" placeholder="选择日期">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col>
            <el-form-item :label="a.name" v-if="a.type == 'Radio'">
              <el-radio-group v-model="radioLists">
                <el-radio :name="b" v-for="(c, b) in a.option" :key="b" :label="c.label"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col>
            <el-form-item :label="a.name" v-if="a.type == 'Checkbox'">
              <el-checkbox-group v-model="checkList">
                <el-checkbox v-model="c.value" v-for="(c, b) in a.option" :key="b"
                  :label="c.label"></el-checkbox>
              </el-checkbox-group>

              <!-- <template>
            {{ a.value }}
          </template> -->
            </el-form-item>
          </el-col>
        </div>
      </el-form>
      <div>

      </div>
      <div slot="footer">
        <Button type="primary" @click="vsmallSuble()">保存</Button>
        <Button type="default" @click="model.box8 = false">关闭</Button>
      </div>
    </vol-box>

    <vol-box :model.sync="modelYY" title="编辑营员" :width="800" :height="500">
      <!-- <Button type="primary" @click="addYY">添加营员</Button> -->
      <Button type="primary" @click="EditYY">编辑营员</Button>
      <vol-table ref="yylisttable" :columns="columnsyy" :height="400"
        :tableData="yylisttable"></vol-table>
      <div slot="footer">
        <Button type="primary" @click="submitSave()">保存</Button>
        <Button type="default" @click="modelYY = false">关闭</Button>
      </div>
    </vol-box>
    <vol-box :model.sync="modelADD" :title="modelADDtitle + '营员'" :width="800" :height="500">
      <VolForm :label-width="100" ref="editFormFieldsYY" :loadKey="true"
        :formFields="editFormFieldsYY" :formRules="editFormOptionsYY"></VolForm>
      <div slot="footer">
        <Button type="primary" @click="submitAdd()">保存</Button>
        <Button type="default" @click="modelADD = false">关闭</Button>
      </div>
    </vol-box>

    <vol-box :model.sync="modelPrice" title="补差价">
      <VolForm :label-width="100" ref="FormFieldsPrice" :loadKey="true"
        :formFields="FormFieldsPrice" :formRules="FormOptionsPrice"></VolForm>
      <div slot="footer">
        <Button type="primary" @click="submitAddmodelPrice()">保存</Button>
        <Button type="default" @click="modelPrice = false">关闭</Button>
      </div>
    </vol-box>
    <vol-box :model.sync="modelOld" title="查看旧订单" :width="1000" :height="500">
      <vol-table ref="listtableOld" :ck="false" :columns="columnOld" :height="400"
        :tableData="listtableOld"></vol-table>
      <div slot="footer">
        <Button type="default" @click="modelOld = false">关闭</Button>
      </div>
    </vol-box>
  </div>
</template>
<script>
import VolHeader from "@/components/basic/VolHeader.vue";
import VolForm from "@/components/basic/VolForm.vue";
import VolBox from "@/components/basic/VolBox.vue";
import VolUpload from "@/components/basic/VolUpload.vue";
import VolTable from "@/components/basic/VolTable.vue";
import choosereservation from "../../mall/volumn/ChooseReservation.vue";
import choosegoods from "./ChooseGoods";
import V_RecordManually from "../../../views/order/V_RecordManually.vue";

export default {
  components: {
    VolForm,
    VolUpload,
    "vol-box": VolBox,
    VolTable,
    choosereservation,
    choosegoods,
    V_RecordManually,
    VolHeader,
  },
  watch: {
    "formFields1.bookingName"(n, o) {
      if (this.changeAll == "1") {
        this.goodTableData.forEach((res) => {
          res.useRen = n;
        });
        // }else{
        //   this.goodTableData.forEach((res) => {
        //   res.useRen = n;
        // });
      }
    },
    formFileds4: {
      handler(n, o) {
        if (
          this.formFileds4.hotelid !== "" &&
          this.formFileds4.roomcode !== "" &&
          this.formFileds4.distributionid !== "" &&
          this.formFileds4.date !== "" &&
          this.formFileds4.stockNumebr !== ""
        ) {
          let formFileds4 = {
            hotelid: this.formFileds4.hotelid,
            roomcode: this.formFileds4.roomcode,
            distributionid: this.formFileds4.distributionid,
            stockNumebr: this.formFileds4.stockNumebr,
            phone: this.formFields1.bookingPhone,
            startDate: this.formFileds4.date[0],
            endDate: this.formFileds4.date[1],
          };
          this.http
            .post("api/Mall_good/GetMallGoodsHotel", formFileds4)
            .then((res) => {
              // console.log(res, '-----');
              this.GoodsHotelList = [];
              let arr = [];
              if (res.data.length != 0) {
                res.data.forEach((i) => {
                  let obj = {
                    label: i.name,
                    value: i.goods_id,
                    key: i.goods_id,
                    ...i,
                  };
                  arr.push(obj);
                });
                this.GoodsHotelList.push(...arr);
              }
            });
        }
      },
      deep: true,
    },
    checkrows: {
      handler(n, o) {
        if (n.length == 0) {
          this.changeZH = "1";
          this.changeTotalNum = this.changeNum;
        }
      },
      deep: true,
      immediate: true,
    },
    formFileds3: {
      handler(n, o) {
        if (
          this.formFileds3.distributorCode !== "" &&
          this.formFileds3.date !== ""
        )
          this.http
            .get(
              "api/producttypes/GetDistriProductType?distributorCode=" +
                this.formFileds3.distributorCode
            )
            .then((res) => {
              let newarr = res.data.filter(function (item, index, arr0) {
                return item.typeName != "酒店";
              });
              this.treeProtyLIST = newarr;
            });
        this.productType = "1";
      },
      deep: true,
      immediate: true,
    },
    // teamScheduledNum: {
    //   handler(newName, oldName) {
    //     // console.log(newName, "teamScheduledNum----");
    //     let reservationType = this.getOption("reservationType");
    //     this.http
    //       .post("/api/Dictionary/GetVueDictionary", ["reservationTypesimple"])
    //       .then((res) => {
    //         this.reserveTypeList = [];
    //         res.forEach((o) => {
    //           if (o.dicNo == "reservationTypesimple") {
    //             if (newName == 0) {
    //               o.data.forEach((i) => {
    //                 if (i.key == 2) {
    //                   console.log(i, "newName==0");
    //                   let obj = {
    //                     value: i.value,
    //                     key: i.key,
    //                   };
    //                   this.reserveTypeList.push(obj);
    //                   this.$set(reservationType, "data", this.reserveTypeList);
    //                 }
    //               });
    //             } else {
    //               o.data.forEach((i) => {
    //                 if (i.key == 4 || i.key == 0) {
    //                   console.log(i, "newName==1");
    //                   let obj = {
    //                     value: i.value,
    //                     key: i.key,
    //                   };
    //                   this.reserveTypeList.push(obj);
    //                   this.$set(reservationType, "data", this.reserveTypeList);
    //                 }
    //               });
    //             }
    //           }
    //         });
    //       });
    //   },
    //   immediate: true,
    // },
  },
  created() {
    //缓存当前对象
    let reserveValue = this.getOption("reserveValue");
    let param = {
      accName: "",
      accCode: "",
      customer: "",
      phone: "",
      isvalid: null,
      start: 0,
      count: 1000,
      Credit: 1,
    };
    console.log(this.aobj, "竟来了");
    let distributorCode = this.getOption3("distributorCode");
    let distributionid = this.getOption4("distributionid");
    let hotelid = this.getOption4("hotelid");
    this.http
      .post("/api/Dictionary/GetVueDictionary", ["distributorList"])
      .then((res) => {
        this.distributorList = [];
        res.forEach((o) => {
          if (o.dicNo == "distributorList") {
            o.data.forEach((i) => {
              let obj = {
                value: i.value,
                key: i.key,
              };
              this.distributorList.push(obj);
              this.$set(distributorCode, "data", this.distributorList);
              this.$set(distributionid, "data", this.distributorList);
            });
          }
        });
      });
    //操作从表
    this.columns.push({
      title: "操作",
      width: 150,
      align: "center",
      render: (h, { row, column, index }) => {
        return h("div", { style: {} }, [
          h(
            "Button",
            {
              style: { "margin-right": "10px" },
              on: {
                click: (e) => {
                  console.log("详情", row);
                  this.open8(row);
                },
              },
            },
            "报名单信息"
          ),
        ]);
      },
    });
    // 获取下拉酒店名称
    let param1 = {
      page: 1,
      rows: 1000,
      sort: "id",
      order: "desc",
      wheres: "[]",
    };
    this.http.post("/api/Hotels/GetHotelPageData", param1).then((res) => {
      this.hotelsList = [];
      res.rows.forEach((item) => {
        let obj = {
          value: item.hotel_Name,
          key: item.hotelid,
        };
        this.hotelsList.push(obj);
        this.$set(hotelid, "data", this.hotelsList);
      });
    });
  },
  methods: {
    openOld(e) {
      this.modelOld = true;
      let parma = {
        orderNumber: e.order_number,
      };
      this.http.get("/api/VSmallOrdersApply/GetOldOrder", parma).then((res) => {
        this.listtableOld = res.rows;
      });
      let param = [
        "order_type",
        "order_status",
        "order_Take",
        "reservationType",
        "distributorList",
        "order_pay",
        "order_pay_type",
      ];
      this.http.post("/api/Dictionary/GetVueDictionary", param).then((res) => {
        let order_type = [];
        let order_status = [];
        let order_Take = [];
        let reservationType = [];
        let distributorList = [];
        let order_pay = [];
        let order_pay_type = [];
        res.forEach((o) => {
          if (o.dicNo == "order_type") {
            order_type = o.data;
          } else if (o.dicNo == "order_status") {
            order_status = o.data;
          } else if (o.dicNo == "order_Take") {
            order_Take = o.data;
          } else if (o.dicNo == "reservationType") {
            reservationType = o.data;
          } else if (o.dicNo == "distributorList") {
            distributorList = o.data;
          } else if (o.dicNo == "order_pay") {
            order_pay = o.data;
          } else if (o.dicNo == "order_pay_type") {
            order_pay_type = o.data;
          }
        });
        this.columnOld.forEach((i) => {
          if (i.field == "type") {
            i.bind.data = order_type;
          } else if (i.field == "status") {
            i.bind.data = order_status;
          } else if (i.field == "isTake") {
            i.bind.data = order_Take;
          } else if (i.field == "reservationType") {
            i.bind.data = reservationType;
          } else if (i.field == "distributorCode") {
            i.bind.data = distributorList;
          } else if (i.field == "is_pay") {
            i.bind.data = order_pay;
          } else if (i.field == "pay_type") {
            i.bind.data = order_pay_type;
          }
        });
      });
    },
    EditCamper() {
      this.modelYY = true;
      this.yylisttable = [];
      this.editFormFieldsYY.memberPhone = this.formFields5.bookingPhone;
      this.GetCampsPeople();
      this.GetCampsPeople2();
    },
    GetCampsPeople() {
      let parma = {
        orderNumber: this.formFields5.order_number,
      };
      this.http
        .get("/api/VSmallOrdersApply/GetCampsPeople", parma)
        .then((res) => {
          this.yylisttable = res.data;
        });
    },
    GetCampsPeople2() {
      let parma = {
        orderNumber: this.formFields5.order_number,
      };
      this.http
        .get("/api/VSmallOrdersApply/GetCampsPeople", parma)
        .then((res) => {
          this.yylisttable2 = res.data;
        });
    },
    addYY() {
      this.modelADD = true;
      this.modelADDtitle = "添加";
      this.$refs.editFormFieldsYY.reset();
    },
    EditYY() {
      let selection = this.$refs.yylisttable.$refs.table.selection;
      if (selection.length == 1) {
        this.editFormFieldsYY.gender = selection[0].gender
          ? selection[0].gender.toString()
          : 0;
        this.editFormFieldsYY.height = selection[0].height;
        this.editFormFieldsYY.name = selection[0].name;
        this.editFormFieldsYY.IdCard = selection[0].idCard;
        this.editFormFieldsYY.IdCardType = selection[0].idCardType
          ? selection[0].idCardType.toString()
          : "";
        this.editFormFieldsYY.shoeSize = selection[0].shoeSize;
        this.editFormFieldsYY.parentsIdCard = selection[0].parentsIdCard;
        this.editFormFieldsYY.parentsName = selection[0].parentsName;
        this.editFormFieldsYY.parentsPhone = selection[0].parentsPhone;
        this.editFormFieldsYY.plateNum = selection[0].plateNum;
        this.editFormFieldsYY.skiLevel = selection[0].skiLevel;
        this.editFormFieldsYY.weight = selection[0].weight;
        this.editFormFieldsYY.remarks = selection[0].remarks;
        this.editFormFieldsYY.memberPhone = selection[0].memberPhone;
        this.editFormFieldsYY.id = selection[0].id;
        this.modelADD = true;
        this.modelADDtitle = "编辑";
      } else {
        this.$Message.error("只能选中一行进行编辑");
      }
    },

    submitAdd() {
      this.$refs.editFormFieldsYY.validate((result) => {
        if (result) {
          if (this.modelADDtitle == "添加") {
            let parma = {
              delKeys: null,
              detailData: null,
              mainData: {
                ...this.editFormFieldsYY,
                order_number: this.formFields5.order_number,
              },
            };
            this.http.post("/api/CampsitePeople/Add", parma).then((res) => {
              console.log(res);
              if (res.status) {
                this.modelADD = false;
                this.$Message.success("保存成功");
                this.modelYY = true;
                this.GetCampsPeople();
              } else {
                this.$Message.error(res.message);
              }
            });
          } else {
            let parma = {
              delKeys: null,
              detailData: null,
              mainData: {
                ...this.editFormFieldsYY,
                order_number: this.formFields5.order_number,
              },
            };
            this.http.post("/api/CampsitePeople/UpdateCampPeopleInfo", parma).then((res) => {
              if (res.status) {
                this.modelADD = false;
                this.$Message.success("保存成功");
                this.modelYY = true;
                this.GetCampsPeople();
              } else {
                this.$Message.error(res.message);
              }
            });
          }
        }
      });

    },
    submitAddmodelPrice() {
      let selection = this.$refs.yylisttable.$refs.table.selection;
      let ids = selection.map((i) => i.id);
      let parma = {
        orderNumber: this.formFields5.order_number,
        outRefundNos: ids.join(),
        priceDifference: this.FormFieldsPrice.priceDifference,
      };
      this.http
        .post("/api/VSmallOrdersApply/SaveCampsPeople", parma)
        .then((res) => {
          if (res.status) {
            this.modelYY = false;
            this.modelPrice = false;
            this.$Message.success("保存成功");
          } else {
            this.$Message.error(res.message);
          }
        });
    },
    submitSave() {
      let selection = this.$refs.yylisttable.$refs.table.selection;
      let ids = selection.map((i) => i.id);
      if (selection.length > this.VSmallOrdersData.length) {
        this.modelPrice = true;
      } else {
        let parma = {
          orderNumber: this.formFields5.order_number,
          outRefundNos: ids.join(),
          priceDifference: "",
        };
        this.http
          .post("/api/VSmallOrdersApply/SaveCampsPeople", parma)
          .then((res) => {
            if (res.status) {
              this.modelYY = false;
              this.$Message.success("保存成功");
            } else {
              this.$Message.error(res.message);
            }
          });
      }
    },
    ExportCamper() {
      let parma = {
        orderNumber: this.formFields5.order_number,
      };
      this.http
        .get("/api/VSmallOrdersApply/ExportCampsPeople", parma)
        .then((res) => {
          let xmlResquest = new XMLHttpRequest();
          xmlResquest.open(
            "GET",
            this.http.ipAddress +
              "api/CampsitePeople/DownLoadFile?path=" +
              res.data,
            true
          );
          xmlResquest.setRequestHeader("Content-type", "application/json");
          xmlResquest.setRequestHeader(
            "Authorization",
            this.$store.getters.getToken()
          );
          xmlResquest.responseType = "blob";
          xmlResquest.onload = function (oEvent) {
            if (xmlResquest.status != 200) {
              this.$error("下载文件出错了..");
              return;
            }
            let content = xmlResquest.response;
            let elink = document.createElement("a");
            elink.download = "营员.xlsx";
            let blob = new Blob([content]);
            elink.href = URL.createObjectURL(blob);
            elink.click();
          };
          xmlResquest.send();
        });
    },
    getBatch() {
      console.log(this.orderrow.id, "获取批次");
      // if (!this.$refs.goodlisttable.getSelected()[0]) {
      //   this.$Message.error("请选中至少一行进行修改");
      //   return;
      // }
      this.model.box6 = true;

      console.log(this.columns);
      let list = [];
      let option = {};
      this.http
        .post("api/VSmallOrdersApply/CampsitePhaseInfo", {
          orderNumber: this.orderrow.id,
        })
        .then((res) => {
          if (res.rows.length > 0) {
            this.radioList = res.rows;
            this.radioList.forEach((item) => {
              let data = Date.parse(new Date(item.phaseBeginTime));
              let nowdate = new Date().getTime();
              if (nowdate > data) {
                item.disabled = true;
              } else {
                item.disabled = false;
              }
            });
          }
        });
    },
    // 打开新建页面生成唯一标识
    algorithm() {
      let abc = [
        "a",
        "b",
        "c",
        "d",
        "e",
        "f",
        "g",
        "h",
        "i",
        "g",
        "k",
        "l",
        "m",
        "n",
        "o",
        "p",
        "q",
        "r",
        "s",
        "t",
        "u",
        "v",
        "w",
        "x",
        "y",
        "z",
      ];
      let [max, min] = [
        Math.floor(Math.random() * (10 - 7 + 1) + 1),
        Math.floor(Math.random() * (17 - 10 + 1) + 17),
      ];
      abc = abc
        .sort(() => 0.4 - Math.random())
        .slice(max, min)
        .slice(0, 8)
        .join("");
      var a = new Date().getTime() + abc;
      this.keyId = a;
      console.log(this.keyId, "this.$refs.gridHeader");
      // return a
    },
    selectProduct() {
      // console.log(this.productType,"this.productType")
      if (this.productType == 2) {
        this.formFileds4.distributionid = this.formFileds3.distributorCode;
      } else if (this.productType == 1) {
        this.formFileds3.distributorCode = this.formFileds4.distributionid;
      }
    },
    handleSelection(val) {
      this.infoFilter = [];
      this.infoFilter = val;
    },

    getSelecte() {
      // var userTypeInfo = JSON.parse(localStorage.getItem("user"));
      let userTypeInfo = JSON.parse(
        sessionStorage.getItem("sessionStorageUSER")
      );
      if (userTypeInfo.userType != "2") {
        this.checkrows = this.$refs.CouponMemberTable.getSelected();
        this.changeZH = "2";
        this.couponidNum = this.checkrows[0].couponid;
        if (this.checkrows[0].type == 1 && this.checkrows[0].use_type == 1) {
          this.changeTotalNum = this.changeNum - this.checkrows[0].coupon_value;
        } else if (
          this.checkrows[0].type == 2 &&
          this.checkrows[0].use_type == 1
        ) {
          try {
            this.goodTableData.forEach((item) => {
              if (item.goods_id == this.checkrows[0].product_id) {
                this.goodprice = item.price;
                let merchandiseDiscount = this.changeNum - this.goodprice;
                console.log(merchandiseDiscount, "兑换券的抵扣金额");
                this.changeTotalNum = merchandiseDiscount;
                throw new Error("LoopInterrupt");
              } else {
                this.changeTotalNum = this.changeNum;
              }
            });
          } catch (e) {
            if (e.message !== "LoopInterrupt") throw e;
          }
        } else if (this.checkrows[0].type == 3) {
          if (this.checkrows[0].use_type == 1) {
            this.changeTotalNum =
              this.changeNum * (this.checkrows[0].coupon_value * 0.1);
          } else if (this.checkrows[0].use_type == 2) {
          } else if (this.checkrows[0].use_type == 3) {
            let newgood = this.goodTableData.filter(function (
              item,
              index,
              arr0
            ) {
              return item.goods_id == this.checkrows[0].product_id;
            });
            let merchandiseDiscount =
              this.changeNum -
              newgood[0].price * (1 - this.checkrows[0].coupon_value * 0.1);
            this.changeTotalNum = merchandiseDiscount;
          } else {
            this.changeTotalNum = this.changeNum;
          }
        } else if (
          this.checkrows[0].type == 4 &&
          this.checkrows[0].use_type == 1
        ) {
          this.changeTotalNum = this.changeNum - this.checkrows[0].coupon_value;
        } else {
          this.changeTotalNum = this.changeNum;
        }
      }
    },

    // 取消订单
    cancleConfirmbox() {
      let option = this.$refs.goodlisttable.getSelected()[0];
      console.log(option.order_number);
      console.log(this.orderrow);
      let str = "";
      if (option) {
        if (this.VSmallOrdersData.length > 0) {
          this.VSmallOrdersData.forEach((item) => {
            if (this.VSmallOrdersData.length == 1) {
              str += item.order_number;
            } else {
              str += item.order_number + ",";
            }
          });
        }
        let param = {
          orderNumber: this.orderrow.order_number,
          outRefundNos:
            this.$refs.goodlisttable.getSelected()[0].childrenNumber,
        };
        console.log(this.VSmallOrdersData);
        this.$confirm("确认取消订单吗?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          customClass: "del-model",
          type: "warning",
        })
          .then(() => {
            this.http
              .post("api/VSmallOrdersApply/ManualRefund", param)
              .then((res) => {
                if (res.code == 0) {
                  this.$Message.success("订单取消成功");
                  // setTimeout(this.RefreshGood(),1);
                  this.model.box5 = false;
                }
              });
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消",
            });
          });
      } else {
        this.$message.error("请先选中需要取消的商品");
      }
    },
    // 修改批次
    OrderConfirmbox() {
      console.log("修改批次");
    },
    OrderConfirm() {
      let rows = this.$refs.goodlisttable.getSelected();
      let orderNumber = [];
      let outRefundNos = [];
      rows.forEach((item) => {
        if (item.order_number == orderNumber[0]) {
          outRefundNos.push(item.childrenNumber);
        } else {
          orderNumber.push(item.order_number);
          outRefundNos.push(item.childrenNumber);
        }
      });
      let obj = {
        orderNumber: orderNumber.join(","),
        outRefundNos: outRefundNos.join(","),
        pmsconfirmationNo: this.formFields6.pmsconfirmationNo,
      };
      this.http
        .post("api/VSmallOrders/OrderConfirmationNo", obj)
        .then((res) => {
          // console.log(res, "OrderReissue");
          if (res.status) {
            this.$Message.success("订单确认成功");
            this.RefreshGood(this.MainOrder);
            this.$store.getters.data().viewPageTest.refresh();
            this.$nextTick(() => {
              this.model.box7 = false;
            });
          } else {
            this.$Message.error(res.message);
          }
        });
      //   api/VSmallOrders/OrderConfirmationNo 酒店订单确认号
    },
    //确认订单
    OrderConfirmPayment() {
      this.$confirm("确认订单, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        customClass: "del-model",
        type: "warning",
      })
        .then(() => {
          let orderNumber = [];
          let outRefundNos = [];
          this.VSmallOrdersData.forEach((item) => {
            if (item.order_number == orderNumber[0]) {
              outRefundNos.push(item.childrenNumber);
            } else {
              orderNumber.push(item.order_number);
              outRefundNos.push(item.childrenNumber);
            }
          });
          let obj = {
            orderNumber: orderNumber.join(","),
            outRefundNos: outRefundNos.join(","),
          };

          this.http
            .post("api/VSmallOrders/OrderConfirmPayment", obj)
            .then((res) => {
              if (res.status) {
                this.$Message.success(res.message);
                this.RefreshGood(this.MainOrder);
                this.$store.getters.data().viewPageTest.refresh();
              } else {
                this.$Message.error(res.message);
              }
            });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消确认支付",
          });
        });
    },
    // 重新下发
    OrderReissue() {
      this.$confirm("重新下发, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        customClass: "del-model",
        type: "warning",
      })
        .then(() => {
          let orderNumber = [];
          let outRefundNos = [];
          this.VSmallOrdersData.forEach((item) => {
            if (item.order_number == orderNumber[0]) {
              outRefundNos.push(item.childrenNumber);
            } else {
              orderNumber.push(item.order_number);
              outRefundNos.push(item.childrenNumber);
            }
          });
          let obj = {
            orderNumber: orderNumber.join(","),
            outRefundNos: outRefundNos.join(","),
          };

          this.http.post("api/VSmallOrders/OrderReissue", obj).then((res) => {
            console.log(res, "OrderReissue");
            if (res.status) {
              this.$Message.success("重新下发成功");
              this.RefreshGood(this.MainOrder);
              this.$store.getters.data().viewPageTest.refresh();
              this.$nextTick(() => {
                this.model.box5 = false;
              });
            } else {
              this.$Message.error(res.message);
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消重新下发",
          });
        });
    },
    //核销
    Verification() {
      let rows = this.$refs.goodlisttable.getSelected();
      this.$confirm("核销, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        customClass: "del-model",
        type: "warning",
      })
        .then(() => {
          let rows = this.$refs.goodlisttable.getSelected();
          let orderNumber = [];
          let outRefundNos = [];
          rows.forEach((item) => {
            if (item.order_number == orderNumber[0]) {
              outRefundNos.push(item.childrenNumber);
            } else {
              orderNumber.push(item.order_number);
              outRefundNos.push(item.childrenNumber);
            }
          });
          let obj = {
            orderNumber: orderNumber.join(","),
            outRefundNos: outRefundNos.join(","),
          };

          this.http.post("api/VSmallOrders/OrderApplied", obj).then((res) => {
            console.log(res, "OrderSendSMS");
            if (res.status) {
              this.$Message.success("核销成功");
              this.$store.getters.data().viewPageTest.refresh();
              this.$nextTick(() => {
                this.model.box5 = false;
                this.RefreshGood(this.MainOrder);
              });
            } else {
              this.$Message.error(res.message);
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消核销",
          });
        });
    },
    // 强制核销
    OrderAppliedForce() {
      let rows = this.$refs.goodlisttable.getSelected();
      this.$confirm("核销, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        customClass: "del-model",
        type: "warning",
      })
        .then(() => {
          let rows = this.$refs.goodlisttable.getSelected();
          let orderNumber = [];
          let outRefundNos = [];
          rows.forEach((item) => {
            if (item.order_number == orderNumber[0]) {
              outRefundNos.push(item.childrenNumber);
            } else {
              orderNumber.push(item.order_number);
              outRefundNos.push(item.childrenNumber);
            }
          });
          let obj = {
            orderNumber: orderNumber.join(","),
            outRefundNos: outRefundNos.join(","),
          };

          this.http
            .post("api/VSmallOrders/OrderAppliedForce", obj)
            .then((res) => {
              console.log(res, "OrderSendSMS");
              if (res.status) {
                this.$Message.success("强制核销成功");
                this.$store.getters.data().viewPageTest.refresh();
                this.$nextTick(() => {
                  this.model.box5 = false;
                  this.RefreshGood(this.MainOrder);
                });
              } else {
                this.$Message.error(res.message);
              }
            });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消强制核销",
          });
        });
    },
    //添加备注
    OrderInfo() {
      this.model.box3 = true;
    },
    // 整单取消
    RefundAll() {
      console.log(this.VSmallOrdersData, "VSmallOrdersData");
      this.$confirm("整单取消商品, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        customClass: "del-model",
        type: "warning",
      })
        .then(() => {
          let orderNumber = [];
          let outRefundNos = [];
          this.VSmallOrdersData.forEach((item) => {
            if (item.order_number == orderNumber[0]) {
              outRefundNos.push(item.childrenNumber);
            } else {
              orderNumber.push(item.order_number);
              outRefundNos.push(item.childrenNumber);
            }
          });
          let obj = {
            orderNumber: orderNumber.join(","),
            outRefundNos: outRefundNos.join(","),
          };

          this.http.post("api/VSmallOrders/ManualRefund", obj).then((res) => {
            if (res.status) {
              this.$Message.success("操作成功");
              this.$nextTick(() => {
                this.RefreshGood(this.MainOrder);
                this.model.box5 = false;
              });
              this.$store.getters.data().viewPageTest.refresh();
            } else {
              this.$Message.error(res.message);
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消商品",
          });
        });
    },
    // 取消
    Refund() {
      let rows = this.$refs.goodlisttable.getSelected();
      console.log(rows, "rows");
      if (rows.length == 0) {
        return this.$message.error("请先选中退款商品");
      }
      this.$confirm("选中退款商品, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        customClass: "del-model",
        type: "warning",
      })
        .then(() => {
          let orderNumber = [];
          let outRefundNos = [];
          rows.forEach((item) => {
            if (item.order_number == orderNumber[0]) {
              outRefundNos.push(item.childrenNumber);
            } else {
              orderNumber.push(item.order_number);
              outRefundNos.push(item.childrenNumber);
            }
          });
          let obj = {
            orderNumber: orderNumber.join(","),
            outRefundNos: outRefundNos.join(","),
          };
          this.http.post("api/VSmallOrders/ManualRefund", obj).then((res) => {
            console.log(res, "ManualRefund");
            if (res.status) {
              this.$Message.success("操作成功");
              this.$nextTick(() => {
                this.RefreshGood(this.MainOrder);
                this.model.box5 = false;
              });
              this.$store.getters.data().viewPageTest.refresh();
            } else {
              this.$Message.error(res.message);
              this.RefreshGood(this.MainOrder);
            }
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消商品退款",
          });
        });
    },
    // 强制取消
    ManualRefundForce() {
      let rows = this.$refs.goodlisttable.getSelected();
      console.log(rows, "rows");
      if (rows.length == 0) {
        return this.$message.error("请先选中退款商品");
      }
      this.$confirm("选中退款商品, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        customClass: "del-model",
        type: "warning",
      })
        .then(() => {
          let orderNumber = [];
          let outRefundNos = [];
          rows.forEach((item) => {
            if (item.order_number == orderNumber[0]) {
              outRefundNos.push(item.childrenNumber);
            } else {
              orderNumber.push(item.order_number);
              outRefundNos.push(item.childrenNumber);
            }
          });
          let obj = {
            orderNumber: orderNumber.join(","),
            outRefundNos: outRefundNos.join(","),
          };
          this.http
            .post("api/VSmallOrders/ManualRefundNewForce", obj)
            .then((res) => {
              console.log(res, "ManualRefund");
              if (res.status) {
                this.$Message.success("操作成功");
                this.$nextTick(() => {
                  this.RefreshGood(this.MainOrder);
                  this.model.box5 = false;
                });
                this.$store.getters.data().viewPageTest.refresh();
              } else {
                this.$Message.error(res.message);
                this.RefreshGood(this.MainOrder);
              }
            });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消商品退款",
          });
        });
    },

    // 刷新商品
    RefreshGood(v) {
      let param = {
        order: "desc",
        page: 1,
        rows: 30,
        sort: "createDate",
        wheres: `[]`,
      };
      this.http.post("/api/VSmallOrders/getPageData", param).then((res) => {
        this.formFields5.bookingName = res.rows[0].bookingName;
        this.formFields5.order_number = res.rows[0].order_number;
        this.formFields5.ticketsCode = res.rows[0].ticketsCode;
        this.formFields5.type = res.rows[0].type;
        this.formFields5.status = res.rows[0].status;
        this.formFields5.bookingPhone = res.rows[0].bookingPhone;
      });
    },
    selectasghdjks(ee) {
      let sum = 0;
      this.goodTableData.forEach((res) => {
        sum += res.price * res.num;
      });
      this.changeNum = sum;
    },
    searchInfo() {
      if (this.formFields1.bookingPhone == "") {
        this.$Message.error("请输入手机号点击查询或查询条件为空");
      } else {
        if (this.formFields1.bookingPhone.length == 11) {
          let param = {
            order: "desc",
            page: 1,
            rows: 30,
            sort: "",
            wheres: `[{\"name\":\"phone\",\"value\":\"${this.formFields1.bookingPhone}\",\"displayType\":\"text\"}]`,
          };

          this.http
            .post("/api/SmallUserArchives/GetSmallUserPageData", param)
            .then((res) => {
              if (res.rows.length != 0) {
                console.log(res.rows, "res");
                if (this.userparameter == 0) {
                  this.formFields2.name = res.rows[0].name;
                  this.formFields2.phone = res.rows[0].phone;
                  this.formFields2.id_card = res.rows[0].id_card;
                  this.formFields2.certificate_type =
                    res.rows[0].certificate_type;
                } else {
                  this.formFields1.bookingName = res.rows[0].name;
                  this.formFields1.bookingPhone = res.rows[0].phone;
                  this.formFields1.bookingIdCard = res.rows[0].id_card;
                  this.formFields1.certificate_type =
                    res.rows[0].certificate_type;
                }
              } else {
                if (this.userparameter == 0) {
                  this.formFields2.name = "";
                  this.formFields2.id_card = "";
                  this.formFields2.certificate_type = "";
                } else {
                  this.formFields1.bookingName = "";
                  this.formFields1.bookingIdCard = "";
                  this.formFields1.certificate_type = "";
                }
              }
            });
        } else {
          this.$Message.error("手机号输入错误");
        }
      }
    },
    searchUseinfo() {
      if (this.formFields2.phone == "") {
        this.$Message.error("请输入手机号点击查询或查询条件为空");
      } else {
        if (this.formFields2.phone.length == 11) {
          let param = {
            order: "desc",
            page: 1,
            rows: 30,
            sort: "",
            wheres: `[{\"name\":\"phone\",\"value\":\"${this.formFields2.phone}\",\"displayType\":\"text\"}]`,
          };
          this.http
            .post("/api/SmallUserArchives/GetSmallUserPageData", param)
            .then((res) => {
              if (res.rows.length != 0) {
                if (this.userparameter == 0) {
                  this.formFields2.name = res.rows[0].name;
                  this.formFields2.phone = res.rows[0].phone;
                  this.formFields2.id_card = res.rows[0].id_card;
                  this.formFields2.certificate_type =
                    res.rows[0].certificate_type;
                } else {
                  this.formFields2.name = res.rows[0].name;
                  this.formFields2.phone = res.rows[0].phone;
                  this.formFields2.id_card = res.rows[0].id_card;
                  this.formFields2.certificate_type =
                    res.rows[0].certificate_type;
                }
              } else {
                if (this.userparameter == 0) {
                  this.formFields2.name = "";
                  this.formFields2.id_card = "";
                  this.formFields2.certificate_type = "";
                } else {
                  this.formFields2.name = "";
                  this.formFields2.id_card = "";
                  this.formFields2.certificate_type = "";
                }
              }
            });
        } else {
          this.$Message.error("手机号输入错误");
        }
      }
    },

    getOption(field) {
      let option;
      this.formRules1.forEach((x) => {
        x.forEach((item) => {
          if (item.field == field) {
            option = item;
          }
        });
      });
      return option;
    },
    getOption3(field) {
      let option;
      this.formRules3.forEach((x) => {
        x.forEach((item) => {
          if (item.field == field) {
            option = item;
          }
        });
      });
      return option;
    },
    getOption4(field) {
      let option;
      this.formRules4.forEach((x) => {
        x.forEach((item) => {
          if (item.field == field) {
            option = item;
          }
        });
      });
      return option;
    },
    // 删除
    delgood(v) {
      let sum = 0;
      this.goodTableData.forEach((item, index) => {
        if (v == item.id) {
          this.goodTableData.splice(index, 1);
          sum += item.price * item.num;
        }
      });
      let sums = sum.toFixed(2);
      this.changeNum -= sums;
    },
    delgoodHotel(v) {
      console.log(this.goodTableData, "this.goodTableData");
      let sum = 0;
      this.goodTableData.forEach((item, index) => {
        console.log(item, index, "delgoodHotel---");
        if (v == item.goods_id) {
          this.goodTableData.splice(index, 1);
          sum += item.price * item.num;
        }
      });
      let sums = sum.toFixed(2);
      this.changeNum -= sums;
    },
    deluser(v) {
      this.researchersInfo.forEach((item, index) => {
        if (v == item.phone) {
          this.researchersInfo.splice(index, 1);
        }
      });
    },
    // 使用人
    userButton(v, n) {
      this.model.box6 = true;
      this.userparameter = n;
      this.userNum = v;
      this.researchersInfo = [];
      this.formFields2.name = "";
      this.formFields2.phone = "";
      this.formFields2.certificate_type = "";
      this.formFields2.id_card = "";
      this.researchersInfo = this.userNum.selectionArr;
      if (this.goodSelectNum == "1") {
        this.goodsSelected();
      } else {
        this.otherSelected();
      }
    },
    //点击确认表单没有数据的时候
    goodsSelected() {
      if (this.userNum.children.length != 0) {
        if (
          this.userNum.children.length == 1 &&
          this.userNum.selectionArr.length == 1
        ) {
          this.$nextTick(() => {
            this.$refs.researchersInfoTable.toggleAllSelection();
          });
        } else {
          this.$nextTick(() => {
            this.userNum.children.forEach((i) => {
              title;
              this.$refs.researchersInfoTable.toggleRowSelection(i, true);
            });
          });
        }
      }
    },
    // 点击确认表单有数据的时候
    otherSelected() {
      this.$refs.researchersInfoTable.clearSelection();
      if (this.researchersInfo.length == 1) {
        this.$refs.researchersInfoTable.toggleAllSelection();
      } else {
        this.researchersInfo.forEach((i, index) => {
          // if (!(this.researchersInfo.length - 1 == index)) {
          if (index == 0) {
            console.log(this.$refs.researchersInfoTable);
            this.$refs.researchersInfoTable.toggleRowSelection(i, true);
          }
        });
      }
    },
    researcherCom() {
      this.formFields2.distributorCode = this.formFileds3.distributorCode;
      this.formFields2.nickname = this.formFields2.name;
      if (this.formFields2.phone.length == 11) {
        let param = {
          order: "desc",
          page: 1,
          rows: 30,
          sort: "",
          wheres: `[{\"name\":\"phone\",\"value\":\"${this.formFields2.phone}\",\"displayType\":\"like\"}]`,
        };
        this.http
          .post("/api/SmallUserArchives/GetSmallUserPageData", param)
          .then((res) => {
            if (this.formFields2.phone != "" && this.formFields2.name != "") {
              if (res.rows.length == 0) {
                let param = { mainData: this.formFields2 };
                console.log(param, "researchersdd");
                this.http
                  .post("/api/SmallUserArchives/Add", param)
                  .then((res) => {
                    console.log(res, "/api/SmallUserArchives/AddSmallUser");
                    this.formFields2.name = "";
                    this.formFields2.phone = "";
                    this.formFields2.certificate_type = "";
                    this.formFields2.id_card = "";
                    if (res.status) {
                      let researcher = res.data;
                      let researcherobj = JSON.parse(researcher).data;
                      let obj = {
                        id: researcherobj.id,
                        id_card: researcherobj.id_card,
                        name: researcherobj.name,
                        phone: researcherobj.phone,
                      };

                      this.researchersInfo.unshift(obj);
                    }
                  });
              } else {
                if (this.researchersInfo.length == 0) {
                  let obj = {
                    id_card: this.formFields2.id_card,
                    name: this.formFields2.name,
                    phone: this.formFields2.phone,
                  };
                  this.researchersInfo.unshift(obj);
                } else {
                  console.log(
                    "过滤",
                    this.researchersInfo,
                    this.formFields2.phone
                  );
                  if (
                    !this.researchersInfo
                      .map((i) => i.phone)
                      .includes(this.formFields2.phone)
                  ) {
                    let obj = {
                      id_card: this.formFields2.id_card,
                      name: this.formFields2.name,
                      phone: this.formFields2.phone,
                    };
                    this.researchersInfo.unshift(obj);
                  }
                  this.researchersInfo.forEach((i) => {
                    if (i.phone == this.formFields2.phone) {
                      i.name = this.formFields2.name;
                    }
                  });
                }
              }
            } else {
              this.$Message.error("必填项没有填写");
              return false;
            }
          });
      }
    },
    researcherComBY() {
      let obj = {
        id_card: this.formFields2.id_card,
        name: this.formFields2.name,
        phone: this.formFields2.phone,
      };
      this.researchersInfo.unshift(obj);
      this.formFields2.distributorCode = this.formFileds3.distributorCode;
      this.formFields2.nickname = this.formFields2.name;
      if (this.formFields2.phone.length == 11) {
        let param = {
          order: "desc",
          page: 1,
          rows: 30,
          sort: "",
          wheres: `[{\"name\":\"phone\",\"value\":\"${this.formFields2.phone}\",\"displayType\":\"like\"}]`,
        };
        this.http
          .post("/api/SmallUserArchives/GetSmallUserPageData", param)
          .then((res) => {
            if (this.formFields2.phone != "" && this.formFields2.name != "") {
              if (res.rows.length == 0) {
                let param = { mainData: this.formFields2 };
                console.log(param, "researchersdd");
                this.http
                  .post("/api/SmallUserArchives/ AddSmallUser", param)
                  .then((res) => {
                    this.formFields2.name = "";
                    this.formFields2.phone = "";
                    this.formFields2.certificate_type = "";
                    this.formFields2.id_card = "";
                    if (res.status) {
                      let researcher = res.data;
                      let researcherobj = JSON.parse(researcher).data;
                      let obj = {
                        id: researcherobj.id,
                        id_card: researcherobj.id_card,
                        name: researcherobj.name,
                        phone: researcherobj.phone,
                      };

                      this.researchersInfo.unshift(obj);
                    }
                  });
              } else {
                if (this.researchersInfo.length == 0) {
                  let obj = {
                    id_card: this.formFields2.id_card,
                    name: this.formFields2.name,
                    phone: this.formFields2.phone,
                  };
                  this.researchersInfo.unshift(obj);
                } else {
                  console.log(
                    "过滤",
                    this.researchersInfo,
                    this.formFields2.phone
                  );
                  if (
                    !this.researchersInfo
                      .map((i) => i.phone)
                      .includes(this.formFields2.phone)
                  ) {
                    let obj = {
                      id_card: this.formFields2.id_card,
                      name: this.formFields2.name,
                      phone: this.formFields2.phone,
                    };
                    this.researchersInfo.unshift(obj);
                  }
                  this.researchersInfo.forEach((i) => {
                    if (i.phone == this.formFields2.phone) {
                      i.name = this.formFields2.name;
                    }
                  });
                }
              }
            } else {
              this.$Message.error("必填项没有填写");
              return false;
            }
          });
      }
    },
    // 点击确认默认选中添加的数据
    closebox6() {
      this.changeAll = "2";
      if (this.formFields1.teamScheduled == 0) {
        if (
          !(this.userNum.num == this.infoFilter.length) &&
          this.infoFilter.length != 1
        ) {
          this.$Message.error("使用人与数量不符或者一个使用可以对应多个数量");
          return;
        }
        if (this.formFields2.name != "") {
          this.userNum.useRen = this.formFields2.name;
          // this.researcherCom();
          this.researcherComBY();
        }
        if (this.formFields2.name == "" && this.formFields2.phone == "") {
          this.goodSelectNum = "1";
          this.goodsSelected();
        } else {
          this.goodSelectNum = "2";
          this.otherSelected();
        }
      } else {
        this.userNum.useRen = this.userNum.children[0].name;
      }
      this.userNum.children = [];
      this.userNum.children = this.infoFilter;
      this.model.box6 = false;
    },
    researchersdd() {
      this.researcherCom();
    },
    uploadAfter(result) {
      let param = {
        filepath: result.data,
        disCode: this.formFileds3.distributorCode,
      };
      this.http
        .post("api/SmallUserArchives/ImportSmallUser", param)
        .then((res) => {
          this.researchersInfo = res.data;
          if (res.status) {
            this.$Message.success(res.message);
          } else {
            this.$Message.error(res.message);
          }
        });
      return true;
    },
    // 下载模版
    downloadExcel() {
      let a = document.createElement("a");
      a.href =
        "https://api.boss.i-town.cn/api/SmallUserArchives/DownLoadUserTemplate";
      //"http://192.168.1.47:9991/api/SmallUserArchives/DownLoadUserTemplate";
      a.download = "文件模板.xls";
      a.style.display = "none";
      document.body.appendChild(a);
      a.click();
      a.remove();
    },
    submit() {
      this.$confirm("是否保存备注?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        customClass: "del-model",
        type: "warning",
      })
        .then(() => {
          let param = {
            mainData: {
              id: this.orderrow.id,
              order_number: this.orderrow.order_number,
              card_equities: this.addRemarks,
              reservationType: this.orderrow.reservationType,
            },
          };
          this.http
            .post("api/VSmallOrdersApply/SaveRemarks", param)
            .then((res) => {
              if (res.code == 311) {
                this.$Message.success(res.message);
                this.model.box3 = false;
              } else {
                this.$Message.error(res.message);
              }
            });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消添加备注",
          });
        });
    },
    handleChange(val) {
      this.handleChangeval = val;
      if (this.handleChangeval == 0) {
        let param = {
          accName: "",
          accCode: "",
          customer: "",
          phone: "",
          isvalid: null,
          start: 0,
          count: 30,
          Credit: 1,
        };
        this.http.post("/api/AccountsMain/AccountsGet", param).then((res) => {
          this.options = [];
          console.log(this.options, "this.options"),
            res.data.accounts.forEach((o) => {
              let obj = {
                label: o.accMain.account_name,
                value: o.accMain.account_code_fk,
              };
              this.options.push(obj);
            });
        });
      }
    },
    handleSelectionChange(val) {
      var ids = [];
      this.selNum = val.length;
      for (var index in val) {
        ids.push(val[index].goods_id);
      }
      for (var i in this.goodTableData) {
        if (ids.indexOf(this.goodTableData[i].id) != -1) {
          this.goodTableData[i].selected = 1;
        } else {
          this.goodTableData[i].selected = 0;
        }
      }
    },
    GetVueDictionary() {
      this.model.box3 = true;
      let param = [
        "Member_Type",
        "supplier",
        "reservationTypesimple",
        "distributorList",
      ];
      this.http.post("/api/Dictionary/GetVueDictionary", param).then((res) => {
        this.reserveTypeList = [];
        this.distributorList = [];
        this.hylxList = [];
        this.treeProtype = [];
        res.forEach((o) => {
          if (o.dicNo == "distributorList") {
            o.data.forEach((i) => {
              let obj = {
                label: i.value,
                value: i.key,
              };
              this.distributorList.push(obj);
            });
          }
          if (o.dicNo == "reservationTypesimple") {
            o.data.forEach((i) => {
              let obj = {
                label: i.value,
                value: i.key,
              };
              this.reserveTypeList.push(obj);
            });
          } else if (o.dicNo == "Member_Type") {
            o.data.forEach((i) => {
              let obj = {
                label: i.value,
                value: i.key,
                key: i.key,
              };
              this.hylxList.push(obj);
            });
          } else if (o.dicNo == "supplier") {
            o.data.forEach((i) => {
              let obj = {
                label: i.value,
                value: i.key,
                key: i.key,
              };
              this.MerchantLIST.push(obj);
            });
          }
        });
      });
    },
    changeCasc(val) {
      var last = val.length;
      if (this.formFileds3.distributorCode != "") {
        this.http
          .post("/api/Mall_good/GetMallGoods", {
            tpyeid: val[last - 1],
            distributionid: this.formFileds3.distributorCode,
            date: this.formFileds3.date,
            phone: this.formFields1.bookingPhone,
          })
          .then((res) => {
            this.productsList = [];
            let arr = [];
            if (res.data.length != 0) {
              res.data.forEach((i) => {
                let obj = {
                  label: i.name,
                  value: i.goods_id,
                  key: i.goods_id,
                  ...i,
                };
                arr.push(obj);
              });
              this.productsList.push(...arr);
              //   var result = [this.productsList[0]];
              //   for (var i = 1; i < this.productsList.length; i++) {
              //     var item = this.productsList[i];
              //     var repeat = false;
              //     for (var j = 0; j < result.length; j++) {
              //       if (item.key == result[j].key) {
              //         repeat = true;
              //         break;
              //       }
              //     }
              //     if (!repeat) {
              //       result.push(item);
              //     }
              //   }
              //   this.productsList = result;
            }
          });
      } else {
        this.$Message.error("请先选择分销商");
      }
    },
    rowClick({ row, column, event }) {
      //table点击行时同时选中当前行
      this.$refs.goodlisttable.$refs.table.toggleRowSelection(row);
      return true;
    },
    getForm() {
      if (!this.$refs.myform.validate()) {
        return;
      }
      let formData = {
        mainData: this.formFileds,
        detailData: this.$refs.tables.tableData,
        delKeys: null,
      };
      let _this = this;
      this.http.post("api/small_order/Add", formData, true).then((x) => {
        if (!x.status) return this.$message.error(x.message);
        this.$message.success(x.message);
        this.tableData = [];
        this.$refs.myform.reset();

        _this.$parent.refresh();
        _this.$parent.refreshRow();
      });
      this.model.box2 = false;
    },
    reset() {
      //重置表单，重置时可指定重置的值，如果没有指定重置的值，默认全部清空
      let data = { Variety: "1", AvgPrice: 888 };
      this.$refs.myform.reset(data);
      this.$message.error("表单已重置");
    },
    getFormOption(field) {
      let option;
      this.formRules.forEach((x) => {
        x.forEach((item) => {
          if (item.field == field) {
            option = item;
          }
        });
      });
      return option;
    },

    open6(row) {
      // 主订单id
      this.orderrow = row;
      this.addRemarks = row.card_equities;
      console.log(row);
      let permission = this.$store.state.system.permission;
      permission.forEach((item) => {
        if (item.name == "综合订单") {
          item.permission.forEach((itemChild) => {
            switch (itemChild) {
              case "ZDQXSGD":
                // console.log('整单取消权限');
                this.cancelButton = true;
                this.OrderConfirmboxParam = true;
                this.OrderInfoParam = true;
                break;
              default:
                break;
            }
          });
        }
      });
      this.MainOrder = row.id;
      this.formFields5.bookingName = this.orderrow.bookingName;
      this.formFields5.order_number = this.orderrow.order_number;
      this.formFields5.ticketsCode = this.orderrow.ticketsCode;
      this.formFields5.type = this.orderrow.type;
      this.formFields5.status = this.orderrow.status;
      this.formFields5.bookingPhone = this.orderrow.bookingPhone;
      let param1 = {
        order: "desc",
        page: 1,
        rows: 100,
        sort: "id",
        value: this.MainOrder,
        wheres: "[]",
      };
      this.http
        .post("/api/VSmallOrders/GetSmallOrderItemPage", param1)
        .then((res) => {
          this.VSmallOrdersData = res.rows;
          let someArr = this.VSmallOrdersData.some(
            (item) => item.parentNumber == 0
          );
          if (someArr.length == this.VSmallOrdersData.length) {
            this.openStatus();
          } else {
            this.VSmallOrdersData = this.VSmallOrdersData.filter(
              (item) => item.parentNumber == 0
            );
            this.openStatus();
          }
          this.$Message.error(res.message);
        });
      this.model.box5 = true;
    },
    openStatus() {
      let everyarr = [];
      this.VSmallOrdersData.forEach((i) => {
        i.status == 4 || i.status == 5
          ? (i.DISABLED = true)
          : (i.DISABLED = false);
        everyarr.push(i.status);
      });
      console.log(everyarr);
      this.$nextTick(() => {
        this.disabledStatus = everyarr.every((item) => item == 4 || item == 3);
      });
    },

    open5() {
      let goods_id = [];
      this.goodTableData.forEach((item) => {
        goods_id.push(item.goods_id);
      });
      let param = {
        phone: this.formFields1.bookingPhone,
        goodList: goods_id,
      };
      this.http.post("api/MebCouponhis/CouponMemberid ", param).then((res) => {
        res.data.forEach((item) => {
          console.log(item.name, item.productList);
          if (item.productList != null) {
            item.productList.forEach((itemchildren) => {
              item.product_id = itemchildren.product_id;
              item.product_name = itemchildren.product_name;
            });
          }
        });

        this.CouponMemberidData = res.data;
      });
      let param1 = ["MebHisUseStatus", "Coupon_Type", "Member_Type"];
      this.http.post("/api/Dictionary/GetVueDictionary", param1).then((res) => {
        res.forEach((i) => {
          // if (i.dicNo == "MebHisUseStatus") {
          //   this.CouponMemberid.forEach((j) => {

          //     if (j.field == "use_status") {
          //       j.bind.data = i.data;
          //     }
          //   });
          // }else
          if (i.dicNo == "Coupon_Type") {
            this.CouponMemberid.forEach((j) => {
              if (j.field == "type") {
                j.bind.data = i.data;
              }
            });
          }
        });
      });
    },
    closeChild() {
      let G_selectValue = this.selectValue.join(",");
      // console.log(this.goodTableData, 'this.goodTableData');
      if (this.productType == 1) {
        this.http
          .post("/api/Mall_good/GetMallGoodsIn", {
            goodids: G_selectValue,
            distributionid: this.formFileds3.distributorCode,
            date: this.formFileds3.date,
            phone: this.formFields1.bookingPhone,
          })
          .then((res) => {
            if (res.status) {
              console.log(res.data, "verificationrulesid");
              if (
                this.formFields1.bookingName != "" &&
                this.formFields1.bookingPhone != ""
              ) {
                let sum = 0;
                //  confirmNum
                // this.confirmNum="2"
                res.data.forEach((o) => {
                  let obj = {
                    goods_id: o.goods_id,
                    title: o.name,
                    price: o.price,
                    num: 1,
                    total_fee: o.price * 1,
                    pic_path: o.pic_path,
                    useRen: this.formFields1.bookingName,
                    sellingRulesid: o.sellingRulesid,
                    sellingRulesName: o.sellingRulesName,
                    stockNumebr: o.stockNumebr,
                    typeid: o.typeid,
                    stockid: o.stockid,
                    playStartDate: this.formFileds3.date,
                    playEndDate: this.formFileds3.date,
                    verificationrulesid: o.verificationrulesid,
                    goodtype: 0,
                    hotel_ID: o.hotel_ID,
                    id: new Date(),
                    children: [
                      {
                        id_card: this.formFields1.bookingIdCard,
                        name: this.formFields1.bookingName,
                        phone: this.formFields1.bookingPhone,
                      },
                    ],
                    selectionArr: [
                      {
                        id_card: this.formFields1.bookingIdCard,
                        name: this.formFields1.bookingName,
                        phone: this.formFields1.bookingPhone,
                      },
                    ],
                  };
                  sum += o.price * 1;
                  this.goodTableData.push(obj);
                });
                if (this.changeNum == 0) {
                  this.changeNum = sum;
                  this.confirmNum = 2;
                } else if (this.confirmNum == 2) {
                  this.changeNum += sum;
                }
                this.model.box4 = false;
              } else {
                // this.goodTableData = [];
                let sum = 0;
                res.data.forEach((o) => {
                  let obj = {
                    goods_id: o.goods_id,
                    title: o.name,
                    price: o.price,
                    num: 1,
                    total_fee: o.price * 1,
                    goodtype: 0,
                    id: new Date(),
                    hotel_ID: o.hotel_ID,
                    useRen: this.formFields1.bookingName,
                    sellingRulesid: o.sellingRulesid,
                    sellingRulesName: o.sellingRulesName,
                    stockNumebr: o.stockNumebr,
                    stockid: o.stockid,
                    typeid: o.typeid,
                    playStartDate: this.formFileds3.date,
                    playEndDate: this.formFileds3.date,
                    verificationrulesid: o.verificationrulesid,
                    children: [],
                    selectionArr: [],
                  };
                  sum += o.price * 1;
                  // this.changeNum = sum;
                  this.goodTableData.push(obj);
                });
                if (this.changeNum == 0) {
                  this.changeNum = sum;
                  this.confirmNum = 2;
                } else if (this.confirmNum == 2) {
                  this.changeNum += sum;
                }
              }
              this.model.box4 = false;
            } else {
              this.productsList = [];
              // this.GoodsHotelList = [];
              this.selectValue = [];
              this.$Message.error(res.message);
              this.model.box4 = true;
            }
          });
      } else {
        this.http
          .post("/api/Mall_good/GetMallGoodsHotelIn", {
            goodids: G_selectValue,
            distributionid: this.formFileds4.distributionid,
            startDate: this.formFileds4.date[0],
            endDate: this.formFileds4.date[1],
            arrTime: this.formFileds4.date[0],
            depTime: this.formFileds4.date[1],
            phone: this.formFields1.bookingPhone,
            stockNumebr: this.formFileds4.stockNumebr,
            hotelid: this.formFileds4.hotelid,
            roomcode: this.formFileds4.roomcode,
          })
          .then((res) => {
            if (res.status) {
              if (
                this.formFields1.bookingName != "" &&
                this.formFields1.bookingPhone != ""
              ) {
                // this.goodTableData = [];

                let sum = 0;
                res.data.forEach((o) => {
                  let obj = {
                    goods_id: o.goods_id,
                    title: o.name,
                    price: o.price,
                    num: this.formFileds4.stockNumebr,
                    total_fee: o.price * 1,
                    goodcount: o.goodcount,
                    minprice: o.minprice,
                    pic_path: o.pic_path,
                    useRen: this.formFields1.bookingName,
                    sellingRulesid: o.sellingRulesid,
                    sellingRulesName: o.sellingRulesName,
                    stockNumebr: this.formFileds4.stockNumebr,
                    typeid: o.typeid,
                    stockid: o.stockid,
                    verificationrulesid: o.verificationrulesid,
                    goodtype: 1,
                    playStartDate: this.formFileds4.date[0],
                    playEndDate: this.formFileds4.date[1],
                    arrTime: this.formFileds4.date[0],
                    depTime: this.formFileds4.date[1],
                    goodcode: o.goodcode,
                    // playStartDate: this.formFileds3.date,
                    // playEndDate: this.formFileds3.date,
                    children: [
                      {
                        id_card: this.formFields1.bookingIdCard,
                        name: this.formFields1.bookingName,
                        phone: this.formFields1.bookingPhone,
                      },
                    ],
                    selectionArr: [
                      {
                        id_card: this.formFields1.bookingIdCard,
                        name: this.formFields1.bookingName,
                        phone: this.formFields1.bookingPhone,
                      },
                    ],
                    stockList: o.stockList,
                  };
                  sum += o.price * this.formFileds4.stockNumebr;
                  // this.changeNum = sum;
                  this.goodTableData.push(obj);
                });
                if (this.changeNum == 0) {
                  this.changeNum = sum;
                  this.confirmNum = 2;
                } else if (this.confirmNum == 2) {
                  this.changeNum += sum;
                }
                this.model.box4 = false;
              } else {
                // this.goodTableData = [];
                let sum = 0;
                res.data.forEach((o) => {
                  let obj = {
                    goods_id: o.goods_id,
                    title: o.name,
                    price: o.price,
                    num: this.formFileds4.stockNumebr,
                    total_fee: o.price * 1,
                    minprice: o.minprice,
                    goodcount: o.goodcount,
                    useRen: this.formFields1.bookingName,
                    sellingRulesid: o.sellingRulesid,
                    sellingRulesName: o.sellingRulesName,
                    stockNumebr: this.formFileds4.stockNumebr,
                    stockid: o.stockid,
                    typeid: o.typeid,
                    playStartDate: this.formFileds4.date[0],
                    playEndDate: this.formFileds4.date[1],
                    // playStartDate: this.formFileds3.date,
                    // playEndDate: this.formFileds3.date,
                    // stockNumebr:
                    goodcode: o.goodcode,
                    children: [],
                    selectionArr: [],
                    stockList: o.stockList,
                    goodtype: 1,
                  };
                  sum += o.price * this.formFileds4.stockNumebr;
                  // this.changeNum = sum;
                  this.goodTableData.push(obj);
                });
                if (this.changeNum == 0) {
                  this.changeNum = sum;
                  this.confirmNum = 2;
                } else if (this.confirmNum == 2) {
                  this.changeNum += sum;
                }
                this.model.box4 = false;
              }
            } else {
              // this.productsList = [];
              this.GoodsHotelList = [];
              this.selectValue = [];
              this.formFileds4.date = "";
              this.$Message.error(res.message);
              this.model.box4 = true;
            }
          });
      }
    },
    getinitDictionary() {
      let distributor = this.getFormOption("distributor");
      let paytype = this.getFormOption("pay_type");
      this.http
        .post(
          "api/Dictionary/GetVueDictionary",
          ["distributorList", "reservationType"],
          false
        )
        .then((reslut) => {
          let datas = [];
          reslut
            .find((item1) => item1.dicNo == "distributorList")
            .data.forEach((item1) => {
              let items = {};
              items.value = item1.value;
              items.key = item1.key;
              datas.push(items);
            });
          distributor.data = datas;
          let data1s = [];
          reslut
            .find((item1) => item1.dicNo == "reservationType")
            .data.forEach((item1) => {
              let items = {};
              items.value = item1.value;
              items.key = item1.key;
              data1s.push(items);
            });
          paytype.data = data1s;
        });
    },
    // 修改批次
    radioChange1(e) {
      this.radioValue = e.id;
      // console.log(this.$refs)
      console.log(this.VSmallOrdersData);
      if (this.VSmallOrdersData.length > 0) {
        this.VSmallOrdersData.forEach((item) => {
          item.title = e.name;
          item.playStartDate = e.phaseBeginTime.slice(0, 9);
          item.playEndDate = e.phaseEndTime.slice(0, 9);
          item.settlement_price = e.preferentialPrice;
          item.settlement_total_fee = e.stockTotal;
        });
      }
    },
    box6Confirm() {
      // this.model.box6 = false;
      let list = [];
      let opions = this.$refs.goodlisttable.getSelected()[0];
      list = [this.orderrow.id, this.radioValue];
      //           this.loading = true;
      this.http
        .post("api/VSmallOrdersApply/OrderPhaseUpdate", list)
        .then((res) => {
          if (res.code == 200) {
            this.$Message.info(res.message);
            //                 this.loading = false;
            //                 this.model.box5 = false;
            this.model.box6 = false;
            this.$store.getters.data().viewPageTest.refresh();
          } else {
            //                 this.loading = false;
            this.$Message.error(res.message);
          }
        });
    },
    // 保存
    vsmallSuble() {
      this.fromObj.jsonString = JSON.stringify(this.aobj);
      this.aobj.forEach((item) => {
        console.log(item.type);
        if (item.type == "Radio") {
          console.log(item);
        }
      });
      this.fromObj.status = 1;
      let param = {
        mainData: this.fromObj,
      };
      console.log(this.aobj, "保存33");
      console.log(this.fromObj, "保存");
      this.http
        .post("api/VSmallOrdersApply/UpdateApplyOrderInfo", param)
        .then((res) => {
          if (res.code == 311) {
            this.$Message.info("保存成功");
            this.model.box8 = false;
          }
        });
    },

    open8(e) {
      let that = this;
      console.log(e);

      let option = {
        page: 1,
        rows: 30,
        sort: "createDate",
        order: "desc",
        wheres: `[{"name":"childrenNumber","value":":"${e.childrenNumber}"","displayType":"text"}]`,
      };
      this.http
        .post("api/mall_form_campsite/Getformcamp", option)
        .then((res) => {
          if (res.status == 0) {
            if (res.rows) {
              that.model.box8 = true;
              this.fromObj = res.rows[0];
              console.log(this.fromObj);
              this.aobj = JSON.parse(this.fromObj.jsonString);
              console.log(this.aobj, "报名单JSON串");
              console.log(this.aobj, "333333333333333");
              console.log(JSON.parse(res.rows[0].jsonString), "报名单行洗");
              res.rows.forEach((item) => {
                console.log(JSON.parse(item.jsonString));
                list.push(JSON.parse(item.jsonString));
              });
              that.form = list;
              console.log(list, this.form[0]);
            } else {
              this.$Message.error("暂无订单信息");
            }
          }
        });
    },
  },
  data() {
    return {
      // 打开新建页面的唯一标识
      // 优惠券列表的显示隐藏
      keyId: "",
      confirmNum: "1",
      radioList: [],
      radioValue: "",
      radioFrom: "",
      goodSelectNum: "1",
      goodTableZJ: [],
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
      },
      couponList: true,
      disabledStatus: true,
      // 整单取消
      RefundAllParam: false,
      // 取消
      RefundParam: false,
      // 核销
      VerificationParam: false,
      //重新下发
      OrderReissueParam: false,
      // 重发短信
      OrderInfoParam: false,
      // 订单确认
      OrderConfirmboxParam: false,
      // disabled:true,
      // 强制核销
      OrderAppliedForceParam: false,
      // 强制取消
      ManualRefundForceParam: false,
      // 取消订单
      cancelButton: false,
      // 订单信息
      orderrow: new Object(),
      MainOrder: "",
      checkrows: [],
      infoFilter: [],
      changeAll: "1",
      changeZH: "1",
      VSmallOrdersData: [],
      changeNum: 0,
      changeTotalNum: 0,
      goodprice: 0,
      couponidNum: "",
      url: "/api/SmallUserArchives/Import",
      userNum: "",
      teamScheduledNum: "",
      handleChangeval: 1,
      specList: [],
      table1url: "",
      productType: "1",
      model: {
        box2: false,
        box1: false,
        box3: false,
        box4: false,
        box5: false,
        box6: false,
        box7: false,
        box8: false,
      },
      tableData: [],
      goodTableData: [],
      options: [],
      reserveValue: "",
      loadKey: true,
      formFileds: {
        bookingPhone: "",
        bookingName: "",
        bookingIdCard: "",
        bookingType: "",
        playStartDate: "",
        reservationType: "",
      },
      formRules: [
        [
          {
            title: "预订人",
            required: true,
            field: "bookingName",
            type: "text",
            extra: {
              style: "color:green",
              icon: "ios-search", //显示图标
              text: "选择联系人", //显示文本
              //触发事件
              click: (item) => {
                this.$store.getters.data().chooserows = this.formFileds;
                this.$store.getters.data().formRules = this.formRules;
                this.model.box1 = true;
                this.$refs.choosereservation.open();

                // this.$refs.choosereservation.reset();
              },
            },
          },
          {
            title: "手机号",
            required: true,
            field: "bookingPhone",
            type: "phone",
          },
        ],
        [
          {
            title: "证件类型",
            field: "bookingType",
            type: "select",
            dataKey: "certificate_type",
            data: [],
          },
          { title: "证件号", field: "bookingIdCard", type: "text" },
        ],
        [
          {
            title: "预定类型",
            required: true,
            field: "reservationType",
            type: "select",
            dataKey: "reservationType",
            data: [],
          },
          {
            title: "分销商",
            field: "distributorCode",
            type: "select",
            dataKey: "distributorList",
            data: [],
          },
        ],
        [
          {
            title: "游玩日期",
            required: true,
            field: "playStartDate",
            type: "date",
            range: true,
            extra: {
              style: "color:blue",
              icon: "ios-search", //显示图标
              text: "选择产品", //显示文本
              //触发事件
              click: (item) => {
                this.$store.getters.data().formFileds = this.formFileds;
                this.$store.getters.data().getGOODList = this;
                if (this.formFileds.playStartDate) {
                  this.$refs.choosegoods.open();
                } else {
                  this.$message.error("请先选择游玩日期！");
                }
              },
            },
          },
        ],
      ],
      tableColumns1: [
        {
          field: "name",
          title: "商品名称",
          type: "string",
          width: 220,
          align: "left",
          sortable: true,
          align: "left",
        },
        {
          field: "sellingPrice",
          title: "售价",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "number",
          title: "数量",
          type: "string",
          width: 90,
          align: "left",
          edit: { type: "number" },
        },
        {
          field: "preferentialPrice",
          title: "优惠价",
          type: "int",
          width: 90,
          align: "left",
        },
        {
          field: "productDate",
          title: "游玩时间",
          type: "datetime",
          width: 200,
          align: "left",
          sortable: true,
        },
        // {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
      ],
      show: true,
      researchersInfo: [],
      multipleSelection: [],
      title: "",
      userparameter: 1,
      editFormFields: {
        creator: "",
        createDate: "",
        bookingName: "", //预订人姓名
        bookingPhone: "", //预订手机号
        bookingIdCard: "", //预订人证件号
        reservationType: "", //预定类型
        teamScheduled: "0",
        order_total_price: "0",
        distributorCode: "", //分销商code
        is_message: "1",
        teamType: "0",
        pay_type: "4",
        coupon_value: 0,
        count: "",
        applicable_people: "",
        useTime: "",
        member_type: "",
        member_level: "",
        threshold_value: "",
        amount_condition: 0,
      },
      loading: false,
      distributorList: [],
      reserveTypeList: [],
      hotelsList: [],
      roomList: [],
      rqStatus: false,
      hylxList: [],
      hydjList: [],
      treeProtype: [],
      defaultCheckedKeys: [],
      cascaderValue: [],
      selectValue: [],
      productsList: [],
      GoodsHotelList: [],
      titles: ["待选商品", "已选商品"],
      transferValue: [],
      transferProtype: [],
      treeProtyLIST: [],
      PLProtyLIST: [],
      couponStatus: true,
      zdPeoValue: [],
      zdPeoProductList: [],
      member_level: [],
      MerchantLIST: [],
      MerchantValue: [],
      form: [
        {
          value: 222,
        },
      ],
      formFields1: {
        bookingName: "",
        bookingPhone: "",
        bookingIdCard: "",
        teamScheduled: 0,
        bookingType: "",
        playStartDate: "",
        reservationType: 0,
        certificate_type: "",
        teamType: 0,
        reserveValue: "",
        spare14: "",
        reserveValueName: "",
      },
      formRules1: [
        [
          {
            title: "手机号",
            field: "bookingPhone",
            type: "phone",
            required: true,
            colSize: 4,
            onKeyPress: ($event) => {
              if ($event.keyCode == 13) {
                this.searchInfo();
              }
            },
          },
          {
            render: (h, {}) => {
              return h(
                "button",
                {
                  class: "ivu-btn",
                  style: {
                    "margin-left": "10px",
                  },
                  on: {
                    click: () => {
                      this.searchInfo();
                    },
                  },
                },
                "查询"
              );
            },
            disabled: true,
            colSize: 1,
          },
          {
            title: "姓名",
            field: "bookingName",
            type: "notnumbers",
            required: true,
            colSize: 5,
          },
        ],
        [
          {
            title: "证件类型",
            field: "certificate_type",
            type: "select",
            dataKey: "certificate_type",
            data: [],

            colSize: 5,
          },

          {
            title: "证件号",
            field: "bookingIdCard",
            type: "text",
            // disabled:true,
            colSize: 5,
          },
        ],
        [
          {
            title: "团队预定",
            field: "teamScheduled",
            type: "switch",
            colSize: 5,
            onChange: (val, option) => {
              console.log(val, "switch");
              this.teamScheduledNum = val;
              if (this.teamScheduledNum == 1) {
                let teamType = this.getOption("teamType");
                teamType.hidden = false;
                teamType.required = true;
                console.log("显示团队");
              } else {
                let teamType = this.getOption("teamType");
                teamType.hidden = true;
                teamType.required = false;
                console.log("隐藏游客");
              }
            },
          },

          {
            title: "团队分类",
            field: "teamType",
            type: "select",
            data: [
              { key: 0, value: "团进团出" },
              { key: 1, value: "团进散出" },
            ],
            hidden: true,
            required: true,
            colSize: 5,
          },
        ],
        [
          {
            title: "预定类型",
            field: "reservationType",
            type: "select",
            dataKey: "reservationTypesimple",
            required: true,
            data: [],
            colSize: 5,
            onChange: (val, option) => {
              console.log(val, "预定类型");
              let reserveValue = this.getOption("reserveValue");
              if (val == 2 || val == 4) {
                reserveValue.hidden = true;
                reserveValue.required = false;
              } else {
                reserveValue.hidden = false;
                reserveValue.required = true;
              }
            },
          },
          {
            title: "挂账单位",
            field: "reserveValue",
            type: "select",
            data: [],
            required: true,
            hidden: true,
            colSize: 5,
          },
          {
            title: "挂账单位",
            field: "reserveValueName",
            type: "text",
            required: true,
            hidden: true,
            colSize: 5,
          },
        ],
        [
          {
            title: "备注",
            field: "spare14",
            type: "textarea",
            data: [],
            colSize: 12,
          },
        ],
      ],
      formFields2: {
        name: "",
        phone: "",
        certificate_type: "",
        id_card: "",
        distributorCode: "",
        nickname: "",
      },
      aobj: [],
      froms: {},
      formRules2: [
        [
          {
            title: "手机号",
            field: "phone",
            type: "phone",
            required: true,
            colSize: 4,
            onKeyPress: ($event) => {
              if ($event.keyCode == 13) {
                this.searchUseinfo();
              }
            },
          },
          {
            render: (h, {}) => {
              return h(
                "button",
                {
                  class: "ivu-btn",
                  style: {
                    "margin-left": "10px",
                  },
                  on: {
                    click: () => {
                      this.searchUseinfo();
                    },
                  },
                },
                "查询"
              );
            },
            colSize: 1,
          },
          {
            title: "姓名",
            field: "name",
            type: "notnumbers",
            required: true,
            colSize: 5,
          },
        ],
        [
          {
            title: "证件类型",
            field: "certificate_type",
            type: "select",
            dataKey: "certificate_type",
            data: [],
            colSize: 5,
          },
          {
            title: "证件号",
            field: "id_card",
            type: "text",
            colSize: 5,
          },
        ],
      ],
      formFileds3: {
        date: "",
        distributorCode: "",
      },
      formRules3: [
        [
          {
            title: "分销商",
            field: "distributorCode",
            type: "select",
            required: true,
            data: [],
          },
          {
            title: "使用日期",
            field: "date",
            type: "date",
            min: new Date().getTime() - 1000 * 60 * 60 * 24,
            required: true,
          },
        ],
      ],
      formFileds4: {
        hotelid: "",
        roomcode: "",
        distributionid: "",
        date: "",
        stockNumebr: "1",
      },
      formRules4: [
        [
          {
            title: "分销商",
            field: "distributionid",
            type: "select",
            required: true,
            data: [],
            colSize: 6,
          },
          {
            title: "酒店名称",
            field: "hotelid",
            type: "select",
            required: true,
            data: [],
            colSize: 6,
            onChange: (val, option) => {
              if (val != "" || val != null) {
                let roomcode = this.getOption4("roomcode");
                let param1 = {
                  page: 1,
                  rows: 1000,
                  sort: "id",
                  order: "desc",
                  wheres: "[]",
                  value: val,
                };
                this.http
                  .post("/api/Hotels/getDetailPage", param1)
                  .then((res) => {
                    this.roomList = [];
                    res.rows.forEach((item) => {
                      let obj = {
                        value: item.room_Name || 0,
                        key: item.room_Code || 0,
                      };
                      this.roomList.push(obj);
                      this.$set(roomcode, "data", this.roomList);
                    });
                  });
              } else {
                this.$Message.success("请先选择酒店");
              }
            },
          },
        ],
        [
          {
            title: "房型码",
            field: "roomcode",
            type: "select",
            required: true,
            data: [],
            colSize: 3,
          },
          {
            title: "房间数量",
            field: "stockNumebr",
            type: "text",
            required: true,
            colSize: 3,
          },

          {
            title: "起止时间",
            field: "date",
            type: "datetime",
            min: new Date().getTime() - 1000 * 60 * 60 * 24,
            required: true,
            range: true,
            colSize: 6,
          },
        ],
      ],
      radioLists: [],
      checkList: [],
      formFields5: {
        bookingName: "",
        order_number: "",
        ticketsCode: "",
        type: "",
        status: "",
        bookingPhone: "",
      },
      formRules5: [
        [
          {
            title: "预订人名称",
            field: "bookingName",
            type: "text",
            disabled: "true",
          },
          {
            title: "订单号",
            required: true,
            field: "order_number",
            type: "text",
            disabled: "true",
          },
          {
            title: "取票码",
            field: "ticketsCode",
            type: "like",
            disabled: "true",
          },
        ],
        [
          {
            title: "订单类型",
            field: "type",
            type: "select",
            dataKey: "order_type",
            disabled: "true",
          },
          {
            title: "订单状态",
            field: "status",
            type: "select",
            dataKey: "order_status",
            disabled: "true",
          },
          {
            title: "预订人电话",
            field: "bookingPhone",
            type: "text",
            disabled: "true",
          },
        ],
      ],
      formFields6: {
        pmsconfirmationNo: "",
        // order_number: "",
        // ticketsCode: "",
        // type: "",
        // status: "",
        // bookingPhone: "",
      },
      formRules6: [
        [
          {
            title: "PMS确认号",
            field: "pmsconfirmationNo",
            type: "text",
          },
          //   {
          //     title: "订单号",
          //     required: true,
          //     field: "order_number",
          //     type: "text",
          //     disabled: "true",
          //   },
          //   {
          //     title: "取票码",
          //     field: "ticketsCode",
          //     type: "like",
          //     disabled: "true",
          //   },
          // ],
          // [
          //   {
          //     title: "订单类型",
          //     field: "type",
          //     type: "select",
          //     dataKey: "order_type",
          //     disabled: "true",
          //   },
          //   {
          //     title: "订单状态",
          //     field: "status",
          //     type: "select",
          //     dataKey: "order_status",
          //     disabled: "true",
          //   },
          //   {
          //     title: "预订人电话",
          //     field: "bookingPhone",
          //     type: "text",
          //     disabled: "true",
          //   },
        ],
      ],
      CouponMemberid: [
        {
          field: "couponid",
          title: "优惠券id",
          type: "string",
          width: 120,
          require: true,
          align: "left",
        },
        {
          field: "name",
          title: "券名称",
          type: "string",
          width: 120,
        },
        {
          field: "product_id",
          title: "商品id",
          type: "string",
          width: 120,
        },
        {
          field: "product_name",
          title: "商品名称",
          type: "string",
          width: 120,
        },
        {
          field: "use_status",
          title: "使用状态",
          type: "int",
          bind: { key: "", data: [{ key: 1, value: "未使用" }] },
          width: 120,
        },
        {
          field: "type",
          title: "券类型 ",
          type: "int",
          bind: { key: "Coupon_Type", data: [] },
          width: 120,
        },
        {
          field: "use_type",
          title: "使用类型",
          bind: {
            key: "",
            data: [
              { key: 1, value: "通用" },
              { key: 2, value: "品类" },
              { key: 3, value: "商品" },
            ],
          },
          type: "int",
          width: 120,
        },
        {
          field: "coupon_value",
          title: "优惠值",
          type: "string",
          width: 120,
        },

        {
          field: "use_starttime",
          title: "使用开始时间",
          type: "string",
          width: 120,
        },
        {
          field: "use_endtime",
          title: "使用结束时间",
          type: "string",
          width: 120,
        },
      ],
      formFields7: [],
      fromObj: new Object(),
      CouponMemberidData: [],
      columns: [
        {
          field: "id",
          title: "主键",
          type: "string",
          width: 120,
          hidden: true,
          readonly: true,
          require: true,
          align: "left",
        },
        {
          field: "playStartDate",
          title: "开始时间",
          type: "datetime",
          edit: { type: "text" },
          width: 85,
          align: "left",
          sortable: true,
        },
        {
          field: "playEndDate",
          title: "结束时间",
          type: "datetime",
          edit: { type: "text" },
          width: 85,
          align: "left",
          sortable: true,
        },
        {
          field: "title",
          title: "商品名称",
          type: "string",
          edit: { type: "select" },
          width: 280,
          align: "left",
          bind: { key: "name", data: [] },
          // onChange: (val, option) => {
          //     if (val != "" || val != null) {
          //    console.log(val,option)
          //     }
          //    }
        },

        {
          field: "name",
          title: "姓名",
          type: "string",
          edit: { type: "text" },
          width: 70,
          align: "left",
        },
        {
          field: "phone",
          title: "手机号",
          type: "string",
          edit: { type: "text" },
          width: 100,
          align: "left",
        },
        {
          field: "settlement_price",
          title: "单价",
          type: "decimal",
          edit: { type: "text" },
          width: 60,
          align: "left",
        },
        {
          field: "num",
          title: "数量",
          type: "int",
          edit: { type: "text" },
          width: 60,
          align: "left",
        },
        {
          field: "settlement_total_fee",
          title: "项目总额",
          edit: { type: "text" },
          type: "decimal",
          width: 75,
          align: "left",
        },
        // {
        //     field: "paydepositPrice",
        //     title: "押金",
        //     type: "decimal",
        //     width: 50,
        //     align: "left",

        // },

        // {
        //     field: "status",
        //     title: "项目状态",
        //     type: "int",
        //     width: 90,
        //     // bind: { key: 'state_Type', data: [] },
        //     bind: {
        //         key: "",
        //         data: [
        //             { key: 0, value: "未同步" },
        //             { key: 1, value: "同步" },
        //             { key: 2, value: "取票" },
        //             { key: 3, value: "核销" },
        //             { key: 4, value: "取消" },
        //             { key: 5, value: "未支付取消" },
        //             { key: 6, value: "应到未到" },
        //             { key: 7, value: "预订" },
        //             { key: 8, value: "在住" },
        //             { key: 9, value: "退房" },
        //             { key: 10, value: "退房S" },
        //             { key: 11, value: "退房D" },
        //             { key: 12, value: "历史订单" },
        //             { key: 13, value: "问询" }
        //         ]
        //     },
        //     align: "left",

        // },

        {
          field: "creator",
          title: "创建人名称",
          type: "string",
          edit: { type: "text" },
          width: 120,
          align: "left",
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          edit: { type: "text" },
          width: 120,
          align: "left",
          sortable: true,
        },
      ],

      tableData8: [],
      columns8: [
        {
          field: "order_number",
          title: "订单单号",
          type: "string",
          width: 150,
          align: "left",
        },
        {
          field: "userName",
          title: "创建人",
          type: "string",
          width: 120,
          align: "left",
        },
        {
          field: "beginDate",
          title: "时间",
          type: "string",
          width: 120,
          align: "left",
        },
        {
          field: "logType",
          title: "日志类型",
          type: "string",
          width: 60,
          align: "left",
        },
        {
          field: "exceptionInfo",
          title: "操作内容",
          type: "string",
          width: 120,
          align: "left",
          show: true,
        },
      ],
      addRemarks: "", //添加备注
      modelYY: false,
      columnsyy: [
        {
          field: "name",
          title: "姓名",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "gender",
          title: "性别",
          type: "int",
          bind: {
            key: "",
            data: [
              { key: "1", value: "男" },
              { key: "2", value: "女" },
              { key: "0", value: "未知" },
            ],
          },
          width: 90,
          align: "left",
        },
        {
          field: "idCard",
          title: "证件号",
          type: "string",
          width: 220,
          align: "left",
        },
        {
          field: "type",
          title: "类型",
          type: "int",
          bind: {
            key: "",
            data: [
              { key: "1", value: "成人" },
              { key: "0", value: "儿童" },
            ],
          },
          width: 60,
          align: "left",
        },
        {
          field: "isUsable",
          title: "状态",
          type: "int",
          bind: {
            key: "",
            data: [
              { key: "1", value: "可用" },
              { key: "0", value: "不可用" },
            ],
          },
          width: 60,
          align: "left",
        },
      ],
      yylisttable: [],
      yylisttable2: [],
      modelADD: false,
      editFormFieldsYY: {
        head_img: "",
        gender: "",
        height: "",
        name: "",
        IdCard: "",
        IdCardType: "",
        shoeSize: "",
        parentsIdCard: "",
        parentsName: "",
        parentsPhone: "",
        plateNum: "",
        skiLevel: "",
        weight: "",
        remarks: "",
        modifier: "",
        modifyDate: "",
        modifyID: "",
        createDate: "",
        createID: "",
        creator: "",
        memberPhone: "",
      },
      editFormOptionsYY: [
        [
          { title: "姓名", field: "name", type: "text", required: true },
          {
            dataKey: "gender",
            data: [],
            title: "性别",
            field: "gender",
            type: "select",
            required: true
          },
          { title: "身高", field: "height", type: "text" },
        ],
        [
          {
            dataKey: "certificate_type",
            data: [],
            title: "证件类型",
            field: "IdCardType",
            type: "select",
            required: true
          },
          { title: "证件号", field: "IdCard", type: "text", required: true },
          {
            field: "plateNum",
            title: "单双板",
            type: "radio",
            width: 90,
            align: "left",
            dataKey: "plateNum",
            data: [],
          },
        ],
        [
          { title: "鞋码", field: "shoeSize" },
          { title: "体重", field: "weight", type: "text" },
          { title: "滑雪水平", field: "skiLevel", type: "text" },
        ],
        [
          { title: "监护人姓名", field: "parentsName" },
          { title: "监护人手机", field: "parentsPhone", type: "phone" },
          { title: "监护人证件号", field: "parentsIdCard" },
        ],

        [
          {
            data: [
              {
                value: "可用",
                key: 1,
              },
              {
                value: "不可用",
                key: 0,
              },
            ],
            title: "状态",
            field: "isUsable",
            type: "select",
          },
          {
            dataKey: "type",
            data: [
              {
                value: "儿童",
                key: 0,
              },
              {
                value: "成人",
                key: 1,
              },
            ],
            title: "类型",
            field: "type",
            type: "select",
          },
        ],
        [
          { title: "监护人姓名", field: "parentsName" },

          { title: "监护人证件号", field: "parentsIdCard" },
        ],

        [
          {
            title: "注意事项/备注",
            field: "remarks",
            type: "textarea",
            colSize: 12,
          },
        ],
      ],
      modelADDtitle: "",
      modelPrice: false,
      FormFieldsPrice: {
        priceDifference: "",
      },
      FormOptionsPrice: [
        [
          {
            title: "补差价",
            field: "priceDifference",
            type: "text",
            colSize: 12,
          },
        ],
      ],
      listtableOld: [],
      columnOld: [
        {
          field: "order_number",
          title: "订单号",
          type: "string",
          width: 200,
          align: "left",
        },
        {
          field: "type",
          title: "订单类型",
          bind: { key: "", data: [] },
          type: "string",
          width: 80,
          align: "left",
        },
        {
          field: "status",
          title: "订单状态",
          bind: { key: "", data: [] },
          type: "string",
          width: 105,
          align: "left",
        },
        {
          field: "ticketsCode",
          title: "取票码",
          type: "string",
          width: 150,
          align: "left",
        },
        {
          field: "isTake",
          title: "票状态",
          bind: { key: "order_Take", data: [] },
          type: "int",
          width: 120,
          align: "left",
        },
        {
          field: "bookingName",
          title: "预定人名称",
          type: "int",
          width: 120,
          align: "left",
        },
        {
          field: "bookingPhone",
          title: "预定人电话",
          type: "int",
          width: 120,
          align: "left",
        },
        {
          field: "reservationType",
          title: "预订类型",
          bind: { key: "reservationType", data: [] },
          type: "string",
          width: 160,
          align: "left",
        },
        {
          field: "distributorCode",
          title: "分销商",
          bind: { key: "distributorList", data: [] },
          type: "string",
          width: 180,
          align: "left",
        },
        {
          field: "is_pay",
          title: "支付状态",
          bind: { key: "order_pay", data: [] },
          type: "string",
          width: 150,
          align: "left",
        },
        {
          field: "pay_type",
          title: "支付方式",
          bind: { key: "order_pay_type", data: [] },
          type: "string",
          width: 160,
          align: "left",
        },
        {
          field: "order_total_price",
          title: "订单总金额",
          type: "decimal",
          width: 160,
          align: "left",
        },
        {
          field: "pay_time",
          title: "付款时间",
          type: "datetime",
          width: 160,
          align: "left",
          sortable: true,
        },
        {
          field: "creator",
          title: "创建人名称",
          type: "string",
          width: 120,
          align: "left",
          sortable: true,
        },
        {
          field: "createID",
          title: "创建人id",
          type: "int",
          width: 90,
          hidden: true,
          align: "left",
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 160,
          align: "left",
          sortable: true,
        },
        {
          field: "modifierID",
          title: "修改人id",
          type: "int",
          width: 90,
          align: "left",
          hidden: true,
        },
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          hidden: true,
          width: 160,
          align: "left",
          sortable: true,
        },
        {
          field: "card_equities",
          title: "备注",
          type: "string",
          width: 220,
          align: "left",
        },
      ],
      modelOld: false,
    };
  },
};
</script>
<style>
.sysm > .el-form-item__content {
  width: 87% !important;
}

.edit_dev .el-transfer-panel {
  width: 280px !important;
}

.edit_dev .el-transfer__buttons {
  padding: 0 15px !important;
}

.edit_dev.el-button {
  padding: 10px 15px !important;
}

.lablecolor .el-form-item__label {
  color: #939394 !important;
  font-size: 12px !important;
}
</style>
<style lang="scss" scoped>
.hx {
  margin: 10px 0;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
}

.z {
  width: 50px;
}

.el-form-item {
  // width: 47% !important;
}

.el-transfer {
  margin-top: 20px;
}

.treeS {
  height: 200px;
  overflow-y: scroll;
}

.cascader {
  margin-top: 20px;
  display: flex;

  .casd {
    max-height: 300px;
    overflow-y: auto;
    width: 2.8rem;
  }

  .el-transfer {
    margin-left: 20px;
    margin-top: 0;
  }
}

.sysm {
  width: 100% !important;
  display: flex;
}

.meInt {
  width: 92%;
}

.fr {
  float: right;
}

.elformwrap {
  width: 80%;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  margin: 0 auto;
  margin-bottom: 100px;
}
</style>
